SharedFlavorsConventionPlugin

class SharedFlavorsConventionPlugin : Plugin<Project>

Convention plugin wiring kmp-product-flavors (Android-style product flavors for KMP, with an AGP bridge) with build-type support enabled.

Applies the upstream KmpFlavorPlugin and seeds buildConfigPackage / appId / appDisplayName from the consuming project's own version catalog appId / appDisplayName version entries, falling back to this project's group/name if the consumer hasn't declared them.

Flavor dimensions, flavors, and build types are deliberately left to each consuming app's own build.gradle.kts — this build-logic module is shared by 3 apps with divergent products/branding, so baking one app's specific flavor list (demo/prod, staging, ...) in here would fight every app that doesn't want it. Apply with id("shared.flavors"), then configure extensions.configure<KmpFlavorExtension> { flavorDimensions { ... }; flavors { ... } } in the consuming module.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun apply(target: Project)